#if 0
//
// Generated by Microsoft (R) D3DX9 Shader Compiler 9.15.779.0000
//
//   fxc /T ps_2_a /E mainPS /Fh
//    C:\Program Files\Rockstar Games\GTA San Andreas\extra_resources\shaders\veh_matref_sm2a.txt
//    C:\Program Files\Rockstar Games\GTA San Andreas\extra_resources\shaders\veh_matref_sm2a.hlsl
//
//
// Parameters:
//
//   float4 LightColor1;
//   float4 MatAmbient;
//   float4 MatDiffuse;
//   float4 MatSpec;
//   float MatSpecPow;
//   sampler2D colorSampler;
//   samplerCUBE envSampler;
//   sampler2D normalSampler;
//   float refmult;
//   float4 sceneambient;
//
//
// Registers:
//
//   Name          Reg   Size
//   ------------- ----- ----
//   LightColor1   c0       1
//   MatDiffuse    c1       1
//   MatAmbient    c2       1
//   MatSpecPow    c3       1
//   refmult       c4       1
//   sceneambient  c5       1
//   MatSpec       c6       1
//   colorSampler  s0       1
//   envSampler    s1       1
//   normalSampler s2       1
//
//
// Default values:
//
//   LightColor1
//     c0   = { 1, 1, 1, 1 };
//
//   MatDiffuse
//     c1   = { 1, 1, 1, 1 };
//
//   MatAmbient
//     c2   = { 0, 0, 0, 1 };
//
//   MatSpecPow
//     c3   = { 40, 0, 0, 0 };
//
//   refmult
//     c4   = { 0.5, 0, 0, 0 };
//
//   sceneambient
//     c5   = { 0, 0, 0, 1 };
//
//   MatSpec
//     c6   = { 1, 1, 1, 1 };
//

    ps_2_x
    def c7, -0.5, 0, 0, 0
    dcl_pp t0.xy
    dcl_pp t1.xyz
    dcl_pp t2.xyz
    dcl_pp t3.xyz
    dcl_pp t4.xyz
    dcl_pp t5.xyz
    dcl_pp t6.xyz
    dcl_2d s0
    dcl_cube s1
    dcl_2d s2
    dp3_pp r0.z, t5, t5
    dp3_pp r0.w, t6, t6
    rsq_pp r0.z, r0.z
    rsq_pp r0.w, r0.w
    mul_pp r1.xyz, r0.z, t5.xzyw
    mul_pp r2.xyz, r0.w, t6.xzyw
    texld r0, t0, s2
    add_pp r3.xy, r0, c7.x
    mul_pp r0.xyz, r2, r3.y
    dp3_pp r0.w, t2, t2
    mad_pp r0.xyz, r3.x, r1, r0
    rsq_pp r1.w, r0.w
    mad_pp r0.xyz, t2.xzyw, r1.w, r0
    mov_pp r1.xyz, t4
    add_pp r3.xyz, r1.xzyw, -t3.xzyw
    dp3_pp r1.w, r0, r0
    dp3_pp r0.w, r3, r3
    rsq_pp r1.w, r1.w
    rsq_pp r2.w, r0.w
    mul_pp r5.xyz, r0, r1.w
    mul_pp r0.xyz, r3, r2.w
    dp3_pp r0.w, r0, r5
    add_pp r0.w, r0.w, r0.w
    mad_pp r1.xyz, r5, -r0.w, r0
    mov_pp r1.xyz, -r1
    texld_pp r0, t0, s0
    texld_pp r1, r1, s1
    nrm_pp r2.xyz, t1
    mad_pp r3.xyz, r3.xzyw, r2.w, r2
    nrm_pp r4.xyz, r3
    mul_pp r3.xyz, r1, c4.x
    dp3_pp r2.w, r4.xzyw, r5
    dp3_pp r2.z, r2.xzyw, r5
    max_pp r1.w, r2.w, c7.y
    pow_pp r2.w, r1.w, c3.x
    max_pp r1.z, r2.z, c7.y
    mul_pp r1.w, r2.w, r1.z
    mul_pp r1.xyz, r1.z, c0
    mov_pp r2.xyz, c0
    mul_pp r2.xyz, r2, c6
    mov_pp r4.xyz, c2
    add_pp r4.xyz, r4, c5
    mad_pp r2.xyz, r1.w, r2, r3
    mad_pp r1.xyz, c1, r1, r4
    mad_pp r0.xyz, r1, r0, r2
    mul_pp r0.w, r0.w, c1.w
    mov_pp oC0, r0

// approximately 53 instruction slots used (3 texture, 50 arithmetic)
#endif

const DWORD g_ps21_mainPS[] =
{
    0xffff0201, 0x0087fffe, 0x42415443, 0x0000001c, 0x000001e4, 0xffff0201, 
    0x0000000a, 0x0000001c, 0x00000100, 0x000001dd, 0x000000e4, 0x00000002, 
    0x00000001, 0x000000f0, 0x00000100, 0x00000110, 0x00020002, 0x00000001, 
    0x000000f0, 0x0000011c, 0x0000012c, 0x00010002, 0x00000001, 0x000000f0, 
    0x00000100, 0x00000137, 0x00060002, 0x00000001, 0x000000f0, 0x00000100, 
    0x0000013f, 0x00030002, 0x00000001, 0x0000014c, 0x0000015c, 0x0000016c, 
    0x00000003, 0x00000001, 0x0000017c, 0x00000000, 0x0000018c, 0x00010003, 
    0x00000001, 0x00000198, 0x00000000, 0x000001a8, 0x00020003, 0x00000001, 
    0x0000017c, 0x00000000, 0x000001b6, 0x00040002, 0x00000001, 0x0000014c, 
    0x000001c0, 0x000001d0, 0x00050002, 0x00000001, 0x000000f0, 0x0000011c, 
    0x6867694c, 0x6c6f4374, 0x0031726f, 0x00030001, 0x00040001, 0x00000001, 
    0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x4174614d, 
    0x6569626d, 0xab00746e, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 
    0x4474614d, 0x75666669, 0x4d006573, 0x70537461, 0x4d006365, 0x70537461, 
    0x6f506365, 0xabab0077, 0x00030000, 0x00010001, 0x00000001, 0x00000000, 
    0x42200000, 0x00000000, 0x00000000, 0x00000000, 0x6f6c6f63, 0x6d615372, 
    0x72656c70, 0xababab00, 0x000c0004, 0x00010001, 0x00000001, 0x00000000, 
    0x53766e65, 0x6c706d61, 0xab007265, 0x000e0004, 0x00010001, 0x00000001, 
    0x00000000, 0x6d726f6e, 0x61536c61, 0x656c706d, 0x65720072, 0x6c756d66, 
    0xabab0074, 0x3f000000, 0x00000000, 0x00000000, 0x00000000, 0x6e656373, 
    0x626d6165, 0x746e6569, 0x5f737000, 0x00615f32, 0x7263694d, 0x666f736f, 
    0x52282074, 0x33442029, 0x20395844, 0x64616853, 0x43207265, 0x69706d6f, 
    0x2072656c, 0x35312e39, 0x3937372e, 0x3030302e, 0xabab0030, 0x05000051, 
    0xa00f0007, 0xbf000000, 0x00000000, 0x00000000, 0x00000000, 0x0200001f, 
    0x80000000, 0xb0230000, 0x0200001f, 0x80000000, 0xb0270001, 0x0200001f, 
    0x80000000, 0xb0270002, 0x0200001f, 0x80000000, 0xb0270003, 0x0200001f, 
    0x80000000, 0xb0270004, 0x0200001f, 0x80000000, 0xb0270005, 0x0200001f, 
    0x80000000, 0xb0270006, 0x0200001f, 0x90000000, 0xa00f0800, 0x0200001f, 
    0x98000000, 0xa00f0801, 0x0200001f, 0x90000000, 0xa00f0802, 0x03000008, 
    0x80240000, 0xb0e40005, 0xb0e40005, 0x03000008, 0x80280000, 0xb0e40006, 
    0xb0e40006, 0x02000007, 0x80240000, 0x80aa0000, 0x02000007, 0x80280000, 
    0x80ff0000, 0x03000005, 0x80270001, 0x80aa0000, 0xb0d80005, 0x03000005, 
    0x80270002, 0x80ff0000, 0xb0d80006, 0x03000042, 0x800f0000, 0xb0e40000, 
    0xa0e40802, 0x03000002, 0x80230003, 0x80e40000, 0xa0000007, 0x03000005, 
    0x80270000, 0x80e40002, 0x80550003, 0x03000008, 0x80280000, 0xb0e40002, 
    0xb0e40002, 0x04000004, 0x80270000, 0x80000003, 0x80e40001, 0x80e40000, 
    0x02000007, 0x80280001, 0x80ff0000, 0x04000004, 0x80270000, 0xb0d80002, 
    0x80ff0001, 0x80e40000, 0x02000001, 0x80270001, 0xb0e40004, 0x03000002, 
    0x80270003, 0x80d80001, 0xb1d80003, 0x03000008, 0x80280001, 0x80e40000, 
    0x80e40000, 0x03000008, 0x80280000, 0x80e40003, 0x80e40003, 0x02000007, 
    0x80280001, 0x80ff0001, 0x02000007, 0x80280002, 0x80ff0000, 0x03000005, 
    0x80270005, 0x80e40000, 0x80ff0001, 0x03000005, 0x80270000, 0x80e40003, 
    0x80ff0002, 0x03000008, 0x80280000, 0x80e40000, 0x80e40005, 0x03000002, 
    0x80280000, 0x80ff0000, 0x80ff0000, 0x04000004, 0x80270001, 0x80e40005, 
    0x81ff0000, 0x80e40000, 0x02000001, 0x80270001, 0x81e40001, 0x03000042, 
    0x802f0000, 0xb0e40000, 0xa0e40800, 0x03000042, 0x802f0001, 0x80e40001, 
    0xa0e40801, 0x02000024, 0x80270002, 0xb0e40001, 0x04000004, 0x80270003, 
    0x80d80003, 0x80ff0002, 0x80e40002, 0x02000024, 0x80270004, 0x80e40003, 
    0x03000005, 0x80270003, 0x80e40001, 0xa0000004, 0x03000008, 0x80280002, 
    0x80d80004, 0x80e40005, 0x03000008, 0x80240002, 0x80d80002, 0x80e40005, 
    0x0300000b, 0x80280001, 0x80ff0002, 0xa0550007, 0x03000020, 0x80280002, 
    0x80ff0001, 0xa0000003, 0x0300000b, 0x80240001, 0x80aa0002, 0xa0550007, 
    0x03000005, 0x80280001, 0x80ff0002, 0x80aa0001, 0x03000005, 0x80270001, 
    0x80aa0001, 0xa0e40000, 0x02000001, 0x80270002, 0xa0e40000, 0x03000005, 
    0x80270002, 0x80e40002, 0xa0e40006, 0x02000001, 0x80270004, 0xa0e40002, 
    0x03000002, 0x80270004, 0x80e40004, 0xa0e40005, 0x04000004, 0x80270002, 
    0x80ff0001, 0x80e40002, 0x80e40003, 0x04000004, 0x80270001, 0xa0e40001, 
    0x80e40001, 0x80e40004, 0x04000004, 0x80270000, 0x80e40001, 0x80e40000, 
    0x80e40002, 0x03000005, 0x80280000, 0x80ff0000, 0xa0ff0001, 0x02000001, 
    0x802f0800, 0x80e40000, 0x0000ffff
};
